<?php

namespace app\admin\model;

use think\Model;

class OverseasTraining extends Model
{

    //设置软删除
    use \traits\model\SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $hidden = ['create_time', 'update_time', 'delete_time'];

    public function club()
    {
        //这种定义方式， 和 一对一的关联belongsTo完全一样
        //return $this->belongsTo('Category', 'cate_id', 'id');
        return $this->hasOne('club', 'id', 'cid');
    }

}
